#pragma once

#include <windows.h>

#ifndef DMRGVO_API
#define DMRGVO_API extern "C" _declspec(dllexport)
#else
#define DMRGVO_API extern "C" _declspec(dllimport) //for customers 
#endif



DMRGVO_API typedef struct stAPI {
	/////////////////	input	//////////////////////////////
	int panelHeight;	//resolution eg:1125*2436
	int panelWidth;
	int rgbgMode;	//delta rgb:0;	rgbg:1
	int paraCnt;	//2 or 3
	int compensationMode;	//RGB mode:0;	white mode:1
	int frac[2];//x,y; 1,2,4
	int CTCL_S;	//8bit, gray6 to gray18
	int CTCL_E;	//8bit, gray0 to gray4
	double slopFactor;	// CTCL slop rate, range 0 to 0.5
	//double** offsetCoef[12];	//[gammaCnt][coef][rgb]
	//double** offsetCoef2[12];	//for other frequence, eg: 90hz share the coef data with 60hz
	double** pCoefR[3]; //[coef][height][width],	if paraCnt==2, pCoefR[0] bypass;    rgbg mode: real resolution(eg: 563,1125,563)		white mode:only pCoefG filled 
	double** pCoefG[3];
	double** pCoefB[3];
	char* chDemuraDataPath;	//DmuraData path  eg:"demuradata.hex"

	/////////////////	output	//////////////////////////////
	unsigned char* pUcDemuraData; //demuradata + CRC(4byte)  
	unsigned int ucDemuraDataLen; //demuradata length(include CRC 4byte)
	int dataSet = 0;	//0:2 set data for different framerate, 1:1 set
	int simPicLen = 0;	// 0:disable,	1,2...:the number of gray simPic 
	UINT8* simPicGray;	//gray list
}paramAPI, * pParamAPI;


DMRGVO_API int preProcess(pParamAPI pParam, ...);


